﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php
require_once dirname(__FILE__) . '/../../../incls/php/dbutils.class.php';
require_once dirname(__FILE__) . '/../../../incls/php/miscutils.class.php';
$myPdo = DbUtils::createPdoInst();
$inst_id = MiscUtils::getParam('inid', 0);
$comp_track_id = MiscUtils::getParam('t', 0);
$cond_vals = new stdClass();
$cond_vals->c = 'comp_track_id = :v1';
$cond_vals->v = array(':v1' => $comp_track_id);
$items = DbUtils::get($myPdo, TABLE_NAME_PREFIX_PLUGIN . 'comp_pic', $cond_vals, 't.id', 'ASC', NULL, NULL, NULL)->d;
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <link href="css/default.css" rel="stylesheet" type="text/css" />
    <script src="jquery-1.2.6.pack.js" type="text/javascript"></script>
    <script src="jquery.flow.1.1.min.js" type="text/javascript"></script>
    
     <!--[if lt IE 7]>
            <script type="text/javascript" src="unitpngfix.js"></script>
    <![endif]-->   

    
    <script type="text/javascript">
    $(function() {
        $("div#controller").jFlow({
            slides: "#slides",
            width: "420px",
            height: "280px"
        });
    });
    </script>
</head>
<body>
<div id="wrap" style="padding: 15px 0 0 30px;">
    <div style="position: absolute; left: 250px"><img src="images/pic.png"/></div>
    <div id="controller" class="hidden">
      <?php 
        foreach ($items as $idx => &$item) {
          echo "
              <span class=\"jFlowControl\">No " . ($idx + 1) . "</span>
            ";
        }
      ?>
    </div>
    <div id="prevNext">
        <img src="images/prev.png" alt="Previous Tab" class="jFlowPrev" />
        <img src="images/next.png" alt="Next Tab" class="jFlowNext" />
    </div>
    
    <div id="slides">
      <?php 
        foreach ($items as $idx => &$item) {
          echo "
              <div><img src=\"$item->path\" alt=\"photo\" width=\"420px\"/><p>每个宝宝都是可爱的天使" . ($idx + 1) . " </p></div>
            ";
        }
      ?>
    </div>
    
</div><!-- end wrap -->
</body>
</html>
